DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / AddByReference Method / AddByReference(Keyword,Byte[]) Method
Attribute tag to add
Attribute value as byte array
Example

In This Topic
    AddByReference(Keyword,Byte[]) Method
    In This Topic
    Add byte[] as attribute value to avoid copying large data
    Syntax
    'Declaration
     
    
    Public Overloads Sub AddByReference( _
       ByVal keyword As Keyword, _
       ByVal Value() As System.Byte _
    ) 
    public void AddByReference( 
       Keyword keyword,
       System.byte[] Value
    )

    Parameters

    keyword
    Attribute tag to add
    Value
    Attribute value as byte array
    Example
    DicomImage image = new DicomImage();
    string patientName = "Doe^John";
    byte[] patientNameBytes = Encoding.ASCII.GetBytes(patientName);
    image.AddByReference(Keyword.PatientName, patientNameBytes);
    var patientName = image.DataSet[Keyword.PatientName].Value.ToString(); // Doe^John
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also